MegLED User’s Guide

By

James R. Graham

21-Jun-99

 

MegLED  is copyright 1997,1998,1999 by James R. Graham

Description:

This ActiveX control provides a binary “LED” function.  
The default appearance is that of a round, red 3-dimensional LED.   
 MegLED is resizable at design-time. 
 It has a number of customizable features:

•	2D ON-color is definable at application design-time.
•	2D OFF-color is definable at application design-time.
•	3D ON-color is definable at application design-time.
•	3D OFF-color is definable application at design-time.
•	Shape (for non-3D mode) can be set to circle, oval, square, rounded square, rectangle, or rounded rectangle at application design-time.
•	Border-width can be set at application design time.
•	Border-color can be set at application design time.
•	Border-style can be set at application design time.
•	Background-style (for non-3D mode) can be set at application design time.
•	Background-color (for non-3D mode) can be set at application design time.

Why MegLED?

Because I’m cheap.  There are a number of LED components available, some for free, but mostly commercial.  Given the simplicity of an ActiveX component that does nothing more than look like an LED that’s either ON or OFF, I decided to make my own.  I need a number of ActiveX components for a major software application I’m writing called “Megalith II”.  This application is a comprehensive control and data-acquisition system for radio-astronomy, both amateur and professional.  While MegLED was designed with the “look” I wanted for Megalith II, it IS customizable and useful as a generic LED component.  Feel free to use it in any of your own applications 

MegLED is royalty-free.
However, I WOULD appreciate two things:

1.)	If you choose to use MegLED for any reason, please let me know so that I can get an idea of how “useful” it really is (and of course, it’ll go a long way toward stroking my ego ).

2.)	If you choose to use MegLED in your own applications, commercial or not, please mention it in any acknowledgements.

That’s it!!

Enjoy MegLED…..or not.

The usual DISCLAIMER:

The author of MegLED is not responsible for any loss of, or damage to: software, data, or computer hardware as a result of MegLED’s use.  The author will not be responsible for any unexpected smoke or noxious vapors emanating from your computer as a result of using MegLED.  In short, you install and use MegLED at your OWN risk.  

Source Code – How and Where to Get It:

As a general rule, I prefer NOT to give out source code, primarily because it’ll show just how bad of a programmer I may be .

However, if you really …. really MUST have access to it, email me and tell me why, and I’ll see what I can do.
How To Use MegLED:

The best way to learn how to use MegLED is to open up the example project included in MegLED.zip.

But before you open the sample project, make sure you’ve installed MegLED correctly.
Start Visual Basic.  Then click on “existing”, browse to the folder containing the sample project named “Sample”, and open it.

Display the form, then take a look at MegLED’s properties.  Diddle with them to get a feel for how
they affect the display.

For details of MegLED’s properties, see the chart below.

Available user properties:

Property		Variable Type	Options	Default	
LEDValue 	2D, 3D	Boolean	TRUE (On), FALSE (OFF)	FALSE	
LEDShape 	2D	Integer	0 (Rectangle), 1 (Square), 2 (Oval), 3 (Circle), 4 (Rounded Rectangle), 5 (Rounded Square)	3 (Circle)	
LEDBackStyle 	2D	Integer	0 (Transparent), 1 (Opaque)	0 (Transparent)	
LEDBackColor 	2D	Long	&H0 (vbBlack), &HFF0000 (vbBlue), &HFFFF00 (vbCyan), &HFF00 (vbGreen), &HFF00FF (vbMagenta), &HFF (vbRed), &HFFFFFF (vbWhite), &HFFFF (vbYellow)	&H808080	
LEDBorderWidth  	2D	Integer		2	
LEDBorderColor 	2D	Long	&H0 (vbBlack), &HFF0000 (vbBlue), &HFFFF00 (vbCyan), &HFF00 (vbGreen), &HFF00FF (vbMagenta), &HFF (vbRed), &HFFFFFF (vbWhite), &HFFFF (vbYellow)	&H0&	
LEDBorderStyle  	2D	Integer	0 (None), 1 (Fixed Single)	1 (Fixed Single)	
LEDONColor 	2D	Long	&H0 (vbBlack), &HFF0000 (vbBlue), &HFFFF00 (vbCyan), &HFF00 (vbGreen), &HFF00FF (vbMagenta), &HFF (vbRed), &HFFFFFF (vbWhite), &HFFFF (vbYellow)	&HFF (vbRed)	
LEDOFFColor 	2D	Long	&H0 (vbBlack), &HFF0000 (vbBlue), &HFFFF00 (vbCyan), &HFF00 (vbGreen), &HFF00FF (vbMagenta), &HFF (vbRed), &HFFFFFF (vbWhite), &HFFFF (vbYellow)	&H0 (vbBlack)	
LED3D 	3D	Boolean	TRUE (3D), FALSE (2D)	TRUE	
LED3DONColor  	3D	Integer	1 (Red), 2 (Green), 3 (Yellow), 4 (Blue)	1 (Red)	
LED3DOFFColor  	3D	Integer	1 (Red), 2 (Green), 3 (Yellow), 4 (Blue)	1 (Red)	

Technical Support:

Please note that MegLED is a work-in-progress.  That said, I would very much appreciate bug reports and suggestions for improvement.  I can be reached at the following:

Email:		jrgraham@indy.net  (preferred – especially for bug-reports)
		graham@iucf.indiana.edu

URL:		http://www.iucf.indiana.edu/~graham

Phone:		Office – (812)855-7882 (weekdays)

If you would like to be notified of version updates, please leave me your email address and I’ll add you to the list.  Your address will be kept confidential.